using System;


namespace FinlogiK.FxCop.Statistics
{
	/// <summary>
	/// Provides data for the <see cref="M:StatisticsCollector.OperationEnded"/> event.
	/// </summary>
	public sealed class AnalysisOperationEndedEventArgs : EventArgs
	{
		#region Fields

		private readonly AnalysisOperation _operation;
		private readonly TimeSpan _duration;

		#endregion

		#region Constructors

		internal AnalysisOperationEndedEventArgs(AnalysisOperation operation, TimeSpan duration)
			: base()
		{
			this._operation = operation;
			this._duration = duration;
		}

		#endregion

		#region Properties

		/// <summary>
		/// Gets an identifier for the operation that has ended.
		/// </summary>
		public AnalysisOperation Operation
		{
			get
			{
				return this._operation;
			}
		}

		/// <summary>
		/// Gets the duration of the operation that has ended.
		/// </summary>
		public TimeSpan Duration
		{
			get
			{
				return this._duration;
			}
		}

		#endregion
	}
}